package com.hzy.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import javax.sql.DataSource;

/**
 * @Package: com.hzy.config
 * @ClassName: DataSourceConfig
 * @Author: 862982795
 * @CreateTime: 2021/07/08 16:18
 * @Description:使用注解的方式配置文件
 */
@Configuration
@PropertySource(value = "database.properties")
public class DataSourceConfig {
    @Bean
    public DataSource dataSource(){
        return new DruidDataSource();
    }
}
